﻿// See https://aka.ms/new-console-template for more information
using AutoMapper;
using System.Reflection;

Console.WriteLine("Hello, World!");
// 1. 准备2个简单的类
public class Demo7
{
    public int Value { get; set; }
}
public class Demo7Dto
{
    public int Value { get; set; }
}
// 2. 配置mapper
public class Demo7Profile : Profile
{
    public Demo7Profile()
    {
        // 只要配置好类的对应关系即可.
        CreateMap<Demo7, Demo7Dto>();
    }
}

var configuration = new MapperConfiguration(cfg =>
{
    cfg.AddProfile<MyProfile.Demo7Profile>();
}

   _mapper = configuration.CreateMapper();
demo7();

